package com.template.server.common.result;

import lombok.Getter;

/**
 * @author liuxf
 * @date 2024/4/12
 * 统一响应结果
 */
@Getter
public enum ResultType {

    OK(200, "成功"), FAIL(300, "失败"), ERROR(500, "发生了一个错误"), NOT_LOGIN(401, "未通过身份认证"),
    NOT_PERMISSION(403,
            "没有访问权限");

    private final int code;
    private final String message;

    ResultType(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
